import * as local from './local.js'
import * as utils from './utils.js'
import * as crypto from './crypto.js'
import * as fileUtils from './files.js'
import * as wxUtils from './wxUtil.js'

import { checkLogin } from './loginInfo.js'

const { setLocalStorage, getLocalStorage, setToken, getToken, removeToken } = local

const {
  // 展示 toast
  showMessage,
  stopBubble,
  stopDefault,
  truncateString,
  stripHtml,
  getTypeof,
} = utils

const { encryptDes, decryptDes } = crypto

const { getBase64ImageByUrl } = fileUtils

const { checkHosId, getAppSct, checkAppSct, outLogin } = wxUtils

export { isDateValid, dayDif, dayOfYear, timeFromDate } from './date'
export { joinQuery } from './browser'

export {
  local,
  setLocalStorage,
  getLocalStorage,
  setToken,
  getToken,
  removeToken,
  // 检查是否登录
  checkLogin,
  utils,
  showMessage,
  stopBubble,
  stopDefault,
  truncateString,
  stripHtml,
  getTypeof,
  fileUtils,
  getBase64ImageByUrl,
  // 加解密
  crypto,
  encryptDes,
  decryptDes,
  checkHosId,
  getAppSct,
  checkAppSct,
  outLogin,
}
